//
//  GeoCodeSearchManager.h
//  AppointmentForCar
//
//  Created by TheMacBook on 2016/11/10.
//  Copyright © 2016年 Herron. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <BaiduMapAPI_Utils/BMKUtilsComponent.h>
#import <BaiduMapAPI_Map/BMKMapComponent.h>
#import <BaiduMapAPI_Search/BMKSearchComponent.h>

typedef void(^GeocodeSearchOption)(CLLocationCoordinate2D pt); ///< 根据位置获取经纬度回调
typedef void(^ReverseGeocodeSearchOption) (NSString * address); ///< 根据经纬度获取位置
@interface GeoCodeSearchManager : NSObject <BMKGeoCodeSearchDelegate>
@property (nonatomic , strong) BMKGeoCodeSearch * geocodesearch;
//@property (nonatomic , weak) BMKMapView * mapView;

@property (nonatomic , copy) GeocodeSearchOption geocodeSearchOptionBlock; ///< 根据位置获取经纬度回调
@property (nonatomic , copy) ReverseGeocodeSearchOption ReverseGeocodeSearchOptionBlock; //< 根据经纬度获取位置

/**
 *  根据位置获取经纬度
 */
- (void)geocodeSearchOptionWithAddress:(NSString *)address results:(GeocodeSearchOption)block;

/**
 *  根据经纬度获取位置
 */
- (void)reverseGeocodeSearchOptionWithLocationCoordinate2D:(CLLocationCoordinate2D)pt results:(ReverseGeocodeSearchOption)block;
@end
